package com.example.javafx.simple;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.SplitPane;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

public class SplitPaneExample extends Application {

    @Override
    public void start(Stage primaryStage) {
        // 创建 SplitPane
        SplitPane splitPane = new SplitPane();
        
        // 创建面板内容
        BorderPane pane1 = new BorderPane(new Label("Pane 1"));
        BorderPane pane2 = new BorderPane(new Label("Pane 2"));
        BorderPane pane3 = new BorderPane(new Label("Pane 3"));
        
        // 将面板添加到 SplitPane
        splitPane.getItems().addAll(pane1, pane2,pane3);
        
        // 创建布局和场景
        Scene scene = new Scene(splitPane, 400, 300);
        
        primaryStage.setTitle("SplitPane Example");
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}